<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	<?php
		$sum = 0; // 初始化总和
		for($i = 1;$i < 7;$i++)
		{
			$factorial = 1;
			for($j = 1;$j <= $i;$j++)
			{
				$factorial *= $j;
			}
			$sum += $factorial;
		}
		
		echo "1 + 2! + 3! + 4! + 5! + 6! = " . $sum;

	?>
	</body>
</html>